<template>
  <div>
    <bread class="filter">
      <h1>
        成果管理
      </h1>
      <div class="filter-block">
        <normal-filter
          :label="filters.text"
          @change="handleLanguage"
          :options="filters.dataset">
        </normal-filter>
      </div>
      <div class="pull-right">
        <el-button size="small" type="success" @click="dialog_college = true">导出Excel</el-button>
      </div>
    </bread>
    <pageContent>
      <el-table
        stripe
        border
        :data="tableData3"
        style="width: 100%"
        >
        <el-table-column
          fixed
          prop="date"
          label="二级单位"
          width="150">
        </el-table-column>
        <el-table-column
          prop="province"
          label="成果总数"
          width="150">
        </el-table-column>
        <el-table-column
          sortable
          v-for="(item, index) in tab_header"
          :key="index"
          :label="item.label"
          :width="item.width">
         <template slot-scope="scope">
           <router-link to="/index/results-view/over-view">
           {{scope.row[item.prop]}}
            <a href="javascript: void(0);"></a>
           </router-link>
          </template>
        </el-table-column>
      </el-table>
    </pageContent>
  </div>
</template>

<script>
import NormalFilter from 'components/NormalFilter';
const cityOptions = ['上海', '北京', '广州', '深圳'];
export default {
  name: 'hello',
  data () {
    return {
      activeName: 'second',
      form: {
        name: '',
        desc: '',
      },
      tab_header: [
        {
          prop: 'province',
          label: '论文',
          width: '80'
        },
        {
          prop: 'province',
          label: '软件著作权',
          width: '120'
        },
        {
          prop: 'province',
          label: '专利',
          width: ''
        },
        {
          prop: 'province',
          label: '个人获奖',
          width: '120'
        },
        {
          prop: 'province',
          label: '学生获奖',
          width: '120'
        },
        {
          prop: 'province',
          label: '继续教育材料',
          width: '140'
        },
        {
          prop: 'province',
          label: '著作',
          width: ''
        },
        {
          prop: 'province',
          label: '成果总数',
          width: '120'
        },
        {
          prop: 'province',
          label: '新闻报道',
          width: '120'
        },
        {
          prop: 'province',
          label: '档案资料',
          width: '120'
        },
        {
          prop: 'province',
          label: '研究报告',
          width: '120'
        },
        {
          prop: 'province',
          label: '鉴定成果',
          width: '120'
        },
        {
          prop: 'province',
          label: '艺术作品',
          width: '120'
        },
        {
          prop: 'province',
          label: '学术会议',
          width: '120'
        },
        {
          prop: 'province',
          label: '访问交流',
          width: '120'
        },

      ],
      dialogVisible: true,
      dialog_college: false,
      checkAll: false,
      checkedCities: ['上海', '北京'],
      cities: cityOptions,
      isIndeterminate: true,
      filters: {
        dataset: [{txt: '全部', val: '0'}, {txt: '中文成果', val: '1'}, {txt: '英文成果', val: '2'}],
        text: '时间'
      },
      tableData3: [{
          date: '数学统计学院',
          name: '全校总计',
          province: '545',
          city: '234',
          address: ' 1518',
          zip: '0909'
        }, {
          date: '2016-05-03',
          name: '全校总计',
          province: '545',
          city: '234',
          address: ' 1518',
          zip: '0909'
        }, {
          date: '2016-05-03',
          name: '全校总计',
          province: '545',
          city: '234',
          address: ' 1518',
          zip: '0909'
        }]
    }
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    handleClose() {

    },
    handleLanguage(){},
    handleCheckAllChange(val) {
      this.checkedCities = val ? cityOptions : [];
      this.isIndeterminate = false;
    },
    handleCheckedCitiesChange(value) {
      let checkedCount = value.length;
      this.checkAll = checkedCount === this.cities.length;
      this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
    }
  },
  components: {
    NormalFilter
  }
};
</script>
<style lang="scss">
  @import './index.scss';
</style>
